<%@ page language="java" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
    String path = request.getContextPath();
%>
<jsp:include page="/admin/inc/incHead.jsp" flush="false"/>

    <script language="javascript">
        function adminDel(adminId) {
            if (confirm('您确定删除吗？')) {
                window.location.href = "<%=path %>/admin/adminDel.action?adminId=" + adminId;
            }
        }

        function adminAdd() {
            var url = "<%=path %>/admin/admin/adminAdd.jsp";
            //var n="";
            //var w="480px";
            //var h="500px";
            //var s="resizable:no;help:no;status:no;scroll:yes";
            //openWin(url,n,w,h,s);
            window.location.href = url;
        }
    </script>
<table class="table table-bordered">
    <tr bgcolor="#E7E7E7">
        <td height="20" colspan="4">员工管理</td>
    </tr>
    <tr align="center" bgcolor="#FAFAF1" height="22">
        <td width="25%">ID</td>
        <td width="25%">用户名</td>
        <td width="25%">等级</td>
        <td width="25%">操作</td>
    </tr>
    <s:iterator value="#request.adminList" var="admin">
        <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='red';"
            onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
            <td width="25%" bgcolor="#FFFFFF" align="center">
                <s:property value="#admin.adminId"/>
            </td>
            <td width="25%" bgcolor="#FFFFFF" align="center">
                <s:property value="#admin.adminName"/>
            </td>
            <td width="25%" bgcolor="#FFFFFF" align="center">
                <s:property value="#admin.adminLevel"/>
            </td>
            <td width="25%" bgcolor="#FFFFFF" align="center">
                <a href="<%=path %>/admin/adminEditPage.action?adminId=<s:property value="#admin.adminId"/>"
                   class="pn-loperator">修改</a>
                <a href="#" onclick="adminDel(<s:property value="#admin.adminId"/>)" class="pn-loperator">删除</a>
            </td>
        </tr>
    </s:iterator>
</table>
<jsp:include page="/common/page.jsp" flush="true"/>
<jsp:include page="/admin/inc/incFoot.jsp" flush="false"/>
